#!/bin/bash

if [[ "$1" == "clean" ]]; then
    if [ -d "build" ]; then
        cd build || exit
        make clean
    fi
elif [[ "$1" == "clean_all" ]];then
    if [ -d "build" ]; then
        rm -rf build
    fi
elif [[ "$1" == "build" ]];then
    if [ ! -d "build" ]; then
        mkdir build
    fi
    cd build || exit
    cmake ..
    make
fi

